package com.freemalll.system.domain;

import java.util.Date;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.freemalll.common.core.annotation.Excel;
import com.freemalll.common.core.annotation.Excel.ColumnType;
import com.freemalll.common.core.web.domain.AuditEntity;
import com.freemalll.common.core.web.domain.BaseEntity;

/**
 * 系统账户表 sys_account
 * 
 * @author freemalll
 */
@TableName("sys_account")
public class SysAccount extends AuditEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Excel(name = "主键ID", cellType = ColumnType.STRING)
    private String id;


    /** 异常次数 */
    @TableField("abnormal_count")
    @Excel(name = "异常次数", cellType = ColumnType.NUMERIC)
    private Integer abnormalCount;

    /** 最大异常次数 */
    @TableField("abnormal_count_max")
    @Excel(name = "最大异常次数", cellType = ColumnType.NUMERIC)
    private Integer abnormalCountMax;

    /** 人员编码同步oa */
    @TableField("account_code")
    @Excel(name = "人员编码同步oa")
    private String accountCode;

    /** 登录名称 */
    @TableField("account_id")
    @Excel(name = "登录名称")
    private String accountId;

    /** 账户名称 */
    @TableField("account_name")
    @Excel(name = "账户名称")
    private String accountName;

    /** 账户状态 */
    @TableField("account_status")
    @Excel(name = "账户状态", readConverterExp = "true=启用,false=禁用")
    private Boolean accountStatus;

    /** 账户类型 admin超级管理员 pub公共 pri 私有 */
    @TableField("account_type_code")
    @Excel(name = "账户类型", readConverterExp = "admin=超级管理员,pub=公共,pri=私有")
    private String accountTypeCode;

    /** 行政组织id */
    @TableField("adm_org_id")
    @Excel(name = "行政组织id")
    private String admOrgId;

    /** 商务编码 */
    @TableField("business_code")
    @Excel(name = "商务编码")
    private String businessCode;

    /** 客户状态 ture 当前账户是一个客户 允许同时也为职员 */
    @TableField("customer_status")
    @Excel(name = "客户状态", readConverterExp = "true=是客户,false=非客户")
    private Boolean customerStatus;

    /** 客户类型  p 自然人 b企业  */
    @TableField("customer_type")
    @Excel(name = "客户类型", readConverterExp = "p=自然人,b=企业")
    private String customerType;

    /** 离职时间 */
    @TableField("departure_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "离职时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date departureTime;

    /** 入职时间 */
    @TableField("entry_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date entryTime;

    /** 身份证号 */
    @TableField("id_card")
    @Excel(name = "身份证号")
    private String idCard;

    /** 是否在职  0 离职  1在职 */
    @TableField("job_status")
    @Excel(name = "是否在职", readConverterExp = "0=离职,1=在职")
    private String jobStatus;

    /** 是否锁定 */
    @TableField("locking")
    @Excel(name = "是否锁定", readConverterExp = "true=锁定,false=未锁定")
    private Boolean locking;

    /** 手机 接收短信 (允许)存在一个手机对应多个账户 */
    @TableField("mobile")
    @Excel(name = "手机号")
    private String mobile;

    /** 账户密码 */
    @TableField("password")
    @Excel(name = "账户密码")
    private String password;

    /** 业务组织id */
    @TableField("service_org_id")
    @Excel(name = "业务组织id")
    private String serviceOrgId;

    /** 职员状态  ture 当前账户是一个职员 允许同时也为客户 */
    @TableField("staff_status")
    @Excel(name = "职员状态", readConverterExp = "true=是职员,false=非职员")
    private Boolean staffStatus;

    /** 唯一id标识  */
    @TableField("unionid")
    @Excel(name = "唯一id标识")
    private String unionid;

    /** OA员工编码 */
    @TableField("oa_emp_code")
    @Excel(name = "OA员工编码")
    private String oaEmpCode;

    /** OA岗位主键 */
    @TableField("job_title_id")
    @Excel(name = "OA岗位主键")
    private String jobTitleId;

    /** 是否OA同步  0 否  1 是 */
    @TableField("sync_status")
    @Excel(name = "是否OA同步", readConverterExp = "true=已同步,false=未同步")
    private Boolean syncStatus;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    public Integer getAbnormalCount() {
        return abnormalCount;
    }

    public void setAbnormalCount(Integer abnormalCount) {
        this.abnormalCount = abnormalCount;
    }

    public Integer getAbnormalCountMax() {
        return abnormalCountMax;
    }

    public void setAbnormalCountMax(Integer abnormalCountMax) {
        this.abnormalCountMax = abnormalCountMax;
    }

    public String getAccountCode() {
        return accountCode;
    }

    public void setAccountCode(String accountCode) {
        this.accountCode = accountCode;
    }

    @NotBlank(message = "登录名称不能为空")
    @Size(min = 0, max = 80, message = "登录名称不能超过80个字符")
    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    @NotBlank(message = "账户名称不能为空")
    @Size(min = 0, max = 80, message = "账户名称不能超过80个字符")
    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public Boolean getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(Boolean accountStatus) {
        this.accountStatus = accountStatus;
    }

    public String getAccountTypeCode() {
        return accountTypeCode;
    }

    public void setAccountTypeCode(String accountTypeCode) {
        this.accountTypeCode = accountTypeCode;
    }

    public String getAdmOrgId() {
        return admOrgId;
    }

    public void setAdmOrgId(String admOrgId) {
        this.admOrgId = admOrgId;
    }

    public String getBusinessCode() {
        return businessCode;
    }

    public void setBusinessCode(String businessCode) {
        this.businessCode = businessCode;
    }

    public Boolean getCustomerStatus() {
        return customerStatus;
    }

    public void setCustomerStatus(Boolean customerStatus) {
        this.customerStatus = customerStatus;
    }

    public String getCustomerType() {
        return customerType;
    }

    public void setCustomerType(String customerType) {
        this.customerType = customerType;
    }

    public Date getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(Date departureTime) {
        this.departureTime = departureTime;
    }

    public Date getEntryTime() {
        return entryTime;
    }

    public void setEntryTime(Date entryTime) {
        this.entryTime = entryTime;
    }

    @Size(min = 0, max = 18, message = "身份证号不能超过18个字符")
    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(String jobStatus) {
        this.jobStatus = jobStatus;
    }

    public Boolean getLocking() {
        return locking;
    }

    public void setLocking(Boolean locking) {
        this.locking = locking;
    }

    @Size(min = 0, max = 25, message = "手机号不能超过25个字符")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getServiceOrgId() {
        return serviceOrgId;
    }

    public void setServiceOrgId(String serviceOrgId) {
        this.serviceOrgId = serviceOrgId;
    }

    public Boolean getStaffStatus() {
        return staffStatus;
    }

    public void setStaffStatus(Boolean staffStatus) {
        this.staffStatus = staffStatus;
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public String getOaEmpCode() {
        return oaEmpCode;
    }

    public void setOaEmpCode(String oaEmpCode) {
        this.oaEmpCode = oaEmpCode;
    }

    public String getJobTitleId() {
        return jobTitleId;
    }

    public void setJobTitleId(String jobTitleId) {
        this.jobTitleId = jobTitleId;
    }

    public Boolean getSyncStatus() {
        return syncStatus;
    }

    public void setSyncStatus(Boolean syncStatus) {
        this.syncStatus = syncStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createId", getCreateId())
            .append("createName", getCreateName())
            .append("createTime", getCreateTime())
            .append("orgCode", getOrgCode())
            .append("orgId", getOrgId())
            .append("updateId", getUpdateId())
            .append("updateName", getUpdateName())
            .append("updateTime", getUpdateTime())
            .append("version", getVersion())
            .append("abnormalCount", getAbnormalCount())
            .append("abnormalCountMax", getAbnormalCountMax())
            .append("accountCode", getAccountCode())
            .append("accountId", getAccountId())
            .append("accountName", getAccountName())
            .append("accountStatus", getAccountStatus())
            .append("accountTypeCode", getAccountTypeCode())
            .append("admOrgId", getAdmOrgId())
            .append("businessCode", getBusinessCode())
            .append("customerStatus", getCustomerStatus())
            .append("customerType", getCustomerType())
            .append("departureTime", getDepartureTime())
            .append("entryTime", getEntryTime())
            .append("idCard", getIdCard())
            .append("jobStatus", getJobStatus())
            .append("locking", getLocking())
            .append("mobile", getMobile())
            .append("password", getPassword())
            .append("serviceOrgId", getServiceOrgId())
            .append("staffStatus", getStaffStatus())
            .append("unionid", getUnionid())
            .append("oaEmpCode", getOaEmpCode())
            .append("jobTitleId", getJobTitleId())
            .append("syncStatus", getSyncStatus())
            .toString();
    }
}